package com.email.entity;

import com.email.service.MessagePushSevice;

public class MessagePushFactory {

	
	public static MessagePushSevice getService(String type) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
		
		String className = "com.email.service.impl."
				+type.substring(0,1).toUpperCase()+type.substring(1).toLowerCase()+"MessagePushSeviceImpl";
		Class<?> service = Class.forName(className);
		return (MessagePushSevice) service.newInstance();
	}
	
}
